From: Matthieu Gallien Date: Fri, 4 Apr 2025 09:06:59 +0000 (+0200) Subject: always make the file we try to delete be read-write as required X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2^2~48^2~5 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=a0136117ca955e5618ba8af4a66d575ff347ed10;p=nextcloud-desktop.git always make the file we try to delete be read-write as required on windows you must only delete read-write files Signed-off-by: Matthieu Gallien --- diff --git a/src/common/filesystembase.cpp b/src/common/filesystembase.cpp index 90dea280f..ffcd4f36b 100644 --- a/src/common/filesystembase.cpp +++ b/src/common/filesystembase.cpp @@ -586,9 +586,7 @@ bool FileSystem::remove(const QString &fileName, QString *errorString) #ifdef Q_OS_WIN // You cannot delete a read-only file on windows, but we want to // allow that. - if (!isWritable(fileName)) { - setFileReadOnly(fileName, false); - } + setFileReadOnly(fileName, false); #endif QFile f(fileName); if (!f.remove()) {